<template>
  <div class="top">
    <!-- <img alt  :src="item.pic" /> -->
    <p>{{obj.title}}</p>
    <img :src="obj.pic" alt="" class="center">
    <div v-html="text"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      obj: {},
      text: "",
    };
  },
  mounted() {
    let id = this.$route.query.id;
    this.$axios
      .get("https://api.it120.cc/small4/cms/news/detail", {
        params: {
          id: id,
        },
      })
      .then((res) => {
        // console.log(res);
        this.obj = res.data.data;
        this.text = res.data.data.content;
      });
  },
};
</script>
<style lang="scss">
.top {
  margin-top: 10vh;
}
</style>
<style lang="scss">
    .center{
        width: 100%;
        height: 8rem;
    }
</style>